{#继承bootstrap下的父模板#}
{% extends 'bootstrap/base.html' %}
{% block title %}
这是父模板
{% endblock %}

{% block navbar %}



   <nav class="navbar navbar-default">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <a class="navbar-brand" href="#"><img src="../static/images/iPhone/logo.jpg" alt="" class="custom-img"></a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="active"><a href="/index">首页 <span class="sr-only">(current)</span></a></li>
        <li><a href="/about01">关于我们</a></li>
          <li><a href="/pro_add01">商品添加</a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">商品分类 <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="/pro_search/iPhone">iPhone</a></li>
              <li role="separator" class="divider"></li>
            <li><a href="/pro_search/iPad">iPad</a></li>
              <li role="separator" class="divider"></li>
            <li><a href="/pro_search/Mac">Mac</a></li>
              <li role="separator" class="divider"></li>
            <li><a href="/pro_search/airpods">airpods</a></li>


          </ul>
        </li>
      </ul>
      <form class="navbar-form navbar-left"  action="/pro_search" method="post">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="请输入商品类型" name="ptype">
        </div>
        <button type="submit" class="btn btn-default">搜索</button>
      </form>
      <ul class="nav navbar-nav navbar-right">
            {% if user %}
          <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">欢迎{{user.username}} <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="{{ url_for('user.user_show') }}">用户中心</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="/user_logout">退出</a></li>
          </ul>
        </li>
          {% else %}
          <li><a href="{{url_for('user.user_login')}}">登录</a></li>
          <li><a href="{{ url_for('user.register') }}">注册</a></li>
          {% endif %}
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>

{% endblock %}
{% block content %}
    {% block container %}
    <h1>Hello!</h1>
    {% endblock %}
{#     #尾部的版权信息#}
{#    {% block footer %}#}
{#        <div class="footer">#}
{#            Copyright © 2022 - 2024  22大数据产业学院 版权所有 |#}
{#        </div>#}
{#    {% endblock %}#}
{% endblock %}
{% block styles %}
    {{ super() }}
    <style>
    .footer{
        height: 100px;
        background-color: aquamarine;
        text-align: center;
        line-height: 100px;
    }

    body{
        background: url("../static/bg.jpg");
        background-size: cover;
    }
    .custom-img{
         width: 23px;
            height: 23px;
    }
    </style>
{% endblock %}
{% block scripts %}
    {{ super() }}
{% endblock %}